import Layout from "@/layouts/index";
// 懒加载 Layout
// import React from "react";
// import lazyLoad from "@/routers/utils/lazyLoad";
// const Layout = lazyLoad(React.lazy(() => import("@/layouts/index")));

export const REDIRECT_NAME = "Redirect";

export const PARENT_LAYOUT_NAME = "ParentLayout";

export const PAGE_NOT_FOUND_NAME = "PageNotFound";

export const EXCEPTION_COMPONENT = () => import("@/views/base/exception/Exception");

/**
 * @description: default layout
 */
export const LayoutIndex = () => <Layout />;

/**
 * @description: parent-layout
 */
export function getParentLayout(_name?: string) {
	return () =>
		new Promise(resolve => {
			resolve({
				name: _name || PARENT_LAYOUT_NAME
			});
		});
}
